//
//  DetailListCell.m
//  翼安保
//
//  Created by duzhi on 2024/4/23.
//

#import "DetailListCell0.h"

@interface DetailListCell0()
@property (strong, nonatomic) UILabel *titleL;
@property (strong, nonatomic) UILabel *tipL;
@end

@implementation DetailListCell0

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self creatUI];
    }
    return self;
}

- (void)creatUI {
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    
    UILabel *titleL = [UILabel new];
    titleL.font = [UIFont systemFontOfSize:relativeWidth(16)];
    titleL.textColor = [UIColor blackColor];
    [self.contentView addSubview:titleL];
    [titleL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(relativeWidth(20));
        make.centerY.mas_equalTo(0);
    }];
    self.titleL = titleL;
    
    UILabel *tipL = [UILabel new];
    tipL.textAlignment = NSTextAlignmentRight;
    tipL.numberOfLines = 0;
    tipL.font = [UIFont systemFontOfSize:relativeWidth(14)];
    tipL.textColor = [[UIColor blackColor] colorWithAlphaComponent:0.5];;
    [self.contentView addSubview:tipL];
    [tipL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(0);
        make.right.mas_equalTo(relativeWidth(-10));
        make.width.mas_equalTo(relativeWidth(200));
    }];
    self.tipL = tipL;
}

- (void)setTitle:(NSString *)title desc:(NSString *)desc {
    self.titleL.text = title;
    self.tipL.text = desc;
}

@end
